import { Modal } from 'antd';
import type { ModalProps } from 'antd/lib/modal';
import React from 'react';
import './index.less';

const Dialog = (
  props: ModalProps & { children?: React.ReactNode; titleAlign?: 'left' | 'center' },
) => {
  return (
    <div>
      <Modal
        bodyStyle={{ backgroundColor: '#3B0A9F' }}
        closeIcon={<img src={require('@/assets/images/icon-close.png')} width="24px" alt={''} />}
        width={560}
        {...props}
        wrapClassName={'dialogModal'}
      >
        {props.children}
      </Modal>
    </div>
  );
};

export default Dialog;
